/**
 * Created by jiaoyumin on 2017/9/29.
 */

import http from '../server';
//旅行社端登录
export const taLogin = () => {
    // return http.fetchPost('/ta/login?token='+token);
  return http.fetchGet('/ta/login');
}
//旅游局登录
export const govLogin = () => {
  return http.fetchGet('/gov/login');
}
//支持信息
export const getSupportInfo = () => {
  return http.fetchGet('/ta/supportinfo')
}

//审核进度
export const getProcess = () => {
  return http.fetchGet('/ta/process')
}

//系统信息
export const getSysInfo = (flag) => {
  let url="";
  if(flag){
    url = "ta";
  }else{
    url = "gov"
  }
  return http.fetchGet('/'+url+'/sysinfo');
}
//旅游局系统信息
export const getGovInfo = () => {
  return http.fetchGet('/gov/sysinfo');
}

//查看季报
export const getCurreportDetail = () => {
  return http.fetchGet('/ta/curreportdetail');
}

//旅行社信息
export const getAgencyInfo = () => {
  return http.fetchGet('/ta/agencyinfo');
}

//网上填报
export const onlineReport = (data) =>{
  return http.fetchPost('/ta/onlinereport',data);
}

//季报详情
export const getReportDetail = (data) => {
  return http.fetchGet('/ta/curreportdetail');
}

//数据分析
export const getAnyLisis = (year) => {
  return http.fetchGet('/ta/anylisis/'+year);
}

//根据id获取季报数据
export const getReportDataForId = (id) => {
  return http.fetchGet('/ta/reportdetail/'+id);
}

//历史记录
export const getReportHistorys = (params) => {
  return http.fetchPost('/ta/reportlist/',params);
}
/**
 * 旅游局
 */
//旅游局进度
export const getTourismProcess = () => {
  return http.fetchGet('/gov/process');
}

//旅行社列表
export const getAgencylist = (params) => {
  return http.fetchPost('/gov/agencylist',params);
}

//停业申报
export const stopAgency = (params) => {
  return http.fetchPost('/gov/agency/stop',params);
}

//停业旅行社列表
export const getStopedAgencyList = (params) => {
  return http.fetchPost('/gov/agencylist/stoped',params);
}

//季报进度
export const getProcessList = ({code,year,season}) => {
  return http.fetchGet('/gov/processlist/'+code+'/'+year+'/'+season);
}
//审核季报详情
export const getGovReportDetail = (code) => {
  return http.fetchGet('/gov/report/detail/'+code);
}